PROJECT(grab_dv)

cmake_minimum_required(VERSION 2.6)

ADD_EXECUTABLE(grab_dv grab_dv.cpp)

# create symbolic lib target for calling target lib_XXX
#ADD_CUSTOM_TARGET( lib DEPENDS lib_${PROJECT_NAME} )

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake_common/")

FIND_PACKAGE(Dc1394CamDriver REQUIRED)
FIND_PACKAGE(OpenCV)
FIND_PACKAGE(Vxl)

IF(DC1394CAMDRIVER_FOUND)
    SET( GRAB_DV_DC1394CAMDRIVER_INSTALLED 1)
    TARGET_LINK_LIBRARIES(grab_dv dc1394cam_driver)
ENDIF(DC1394CAMDRIVER_FOUND)

IF(VXL_FOUND)
    SET( GRAB_DV_VXL_INSTALLED 1)
    TARGET_LINK_LIBRARIES(grab_dv vil vul)
ENDIF(VXL_FOUND)

IF(OPENCV_FOUND)
    SET( GRAB_DV_OPENCV_INSTALLED 1)
    TARGET_LINK_LIBRARIES(grab_dv highgui)
ENDIF(OPENCV_FOUND)
